package com.ayf.payment.game.api.entity;

import com.ayf.payment.game.api.entity.base.BaseEntity;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

import javax.persistence.Column;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 玩家提现申请订单表
 */
@Data
@FieldNameConstants
@Table(name = "g_game_player_cash_order")
public class GamePlayerCashOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 商户号
     */
    @Column(name = "merchant_id")
    private Integer merchantId;

    /**
     * 游戏订单号
     */
    @Column(name = "game_order_no")
    private String gameOrderNo;

    /**
     * 商户订单号
     */
    @Column(name = "merchant_order_no")
    private String merchantOrderNo;

    /**
     * 申请金额 单位:元
     */
    @Column(name = "apply_amount")
    private BigDecimal applyAmount;

    /**
     * 付款金额 单位:元
     */
    @Column(name = "trans_amount")
    private BigDecimal transAmount;

    /**
     * 代付手续费
     */
    @Column(name = "fee")
    private BigDecimal fee;

    /**
     * 付款类型  1-支付宝 2-爱游宝 3-线下
     */
    @Column(name = "pay_type")
    private Integer payType;

    /**
     * 收款账号
     */
    @Column(name = "account_no")
    private String accountNo;

    /**
     * 收款人姓名
     */
    @Column(name = "`name`")
    private String name;

    /**
     * 付款申请时间
     */
    @Column(name = "apply_time")
    private Date applyTime;

    /**
     * 付款完成时间
     */
    @Column(name = "finish_time")
    private Date finishTime;

    /**
     * 付款说明
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 付款状态:0-等待付款 1-付款处理中 2-付款成功 3-付款失败
     */
    @Column(name = "`status`")
    private Integer status;

    /**
     * 付款失败原因
     */
    @Column(name = "fail_reason")
    private String failReason;

    /**
     * 分区名称
     */
    @Column(name = "partition_name")
    private String partitionName;

    /**
     * 游戏名称
     */
    @Column(name = "game_name")
    private String gameName;

    /**
     * 游戏账号
     */
    @Column(name = "game_account")
    private String gameAccount;

    /**
     * 机器码
     */
    @Column(name = "machine_code")
    private String machineCode;

    @Column(name = "request_ip")
    private String requestIp;

    @Column(name = "notify_url")
    private String notifyUrl;

    /**
     * 是否自动打款 0否 1 是 默认 0
     */
    @Column(name = "is_auto")
    private Integer isAuto;

    /**
     * 是否通知网关成功 0否 1 通知成功 2通知失败 默认 0
     */
    @Column(name = "is_notify_success")
    private Integer isNotifySuccess;

    /**
     * 订单申请日期 格式:yyyyMMdd
     */
    @Column(name = "apply_time_index")
    private Integer applyTimeIndex;
}